<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="Entidades.*"%>
<%@page import="java.util.*"%>
<%@page import="java.lang.*"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Compania de Onibus LTDA</title>
        <link href="css/styles.css" rel="stylesheet" type="text/css" />
        <link href="lib/jqueryui/css/excite-bike/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css" />
        <link rel="stylesheet" href="lib/nivo-slider/themes/default/default.css" type="text/css" media="screen" />
        <link rel="stylesheet" href="lib/nivo-slider/nivo-slider.css" type="text/css" media="screen" />

        <script type="text/javascript" src="lib/jquery.min.js"></script>
        <script type="text/javascript" src="lib/jqueryui/js/jquery-ui-1.8.16.custom.min.js"></script>
        <script type="text/javascript" src="lib/nivo-slider/jquery.nivo.slider.pack.js"></script>
        <script type="text/javascript">
            $(function() {
                jQuery( "input:submit" ).button();
            });
        </script>
</head>

<body>

<!-- TOP -->

        <div id="top">
            <a href="index.html"><img src="images/logo_texto.png" alt="Logo" border="0" style="padding-left: 100px; padding-top: 50px;"/></a>
        </div>

<!-- HEADER -->

<div id="header">

<div id="formPan">

<div id="dadosJSP">
<h1>Compra de Passagem</h1><br/>
        <%
            session = request.getSession(true);
            Rota r = (Rota)session.getAttribute("rota");
            String nomeCompania = (String)session.getAttribute("escolhaCompania");
            String nomeRota = r.getNome();
            Cliente c = (Cliente)session.getAttribute("cliente");
            int cpf = c.getCpf();
        %>
        <form id="key" name="compraPassagem" action="servletGerencia" method="POST">
            Nome Rota : <%=nomeRota%><br/><br/>
            Compania : <%=nomeCompania%><br/><br/>
            Numero Onibus : <input type="text" name="numeroOnibus" value="" /><br><br/>
            Numero Poltrona : <input type="text" name="numeroPoltrona" value="" /><br><br/>
            Hora Saida : <input type="text" name="HoraSaida" value="" /><br><br/>
            Hora Chegada : <input type="text" name="HoraChegada" value="" /><br><br/>

            <input type="hidden" name="Cliente_cpf" value="<%=cpf%>" /><br>
            <input type="hidden" name="id" value="1" />

            <input type="hidden" name="nomeRota" value="<%=nomeRota%>" />
            <input type="hidden" name="nomeCompania" value="<%=nomeCompania%>" />
            <input type="hidden" value="compraPassagem" name="opcao"/>
            <input type="submit" name="submit" id="submit" value="Comprar"  onclick=" document.getElementById('key').action='servletGerencia'; return true; ">
            <input type="submit" name="submit" id="submit" value="Voltar"  onclick=" document.getElementById('key').action='PesquisaRota.jsp'; return true; ">
        </form>
</div>
</div>

</body>
</html>

